@import '../../containers/Application/colors.scss';

$color: $white;
$hoverColor: $shakespeare;
$lightColor: $silver;

.user-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.button {
    width: 100%;
    display: flex;
    align-items: center;
    height: 60px;
    cursor: pointer;
    color: $color;
    border: 0;
    background-color: transparent;

    &:hover,
    &:focus {
        color: $hoverColor;
    }

    &.active {
        font-weight: bold;
    }
}

.user-image {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    overflow: hidden;
    margin-right: 10px;

    .image,
    .placeholder {
        display: block;
        flex: 1 1 auto;
        width: 100%;
        height: 100%;
        border-radius: 100%;
    }

    .image {
        object-fit: cover;
    }

    .placeholder {
        color: $alto;
        font-size: 20px;
        line-height: 30px;
        text-align: center;
        background-color: $mirage;
    }
}

.username {
    flex: 1 1 auto;
    margin-right: 5px;
}

.menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-height: 0;
    transition: all .1s;
    padding-left: 42px;
    will-change: max-height, padding-bottom;

    &.open {
        max-height: 86px;
        padding-bottom: 20px;
    }
}

.menu-button {
    color: $lightColor;
    padding-block: 10px;

    &:hover,
    &:focus {
        color: $hoverColor;
    }
}
